/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package main.java.cn.webrx;

/**
 * <p>Project: jse2204 - Ex
 * <p>Powered by webrx On 2022-09-22 09:19:31
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Ex {
    public static void main(String[] args) {
        System.out.println(sum(3));
    }


    public static int sum(int i){
        if(i>0) return i + sum(i-1);
        return 0;
    }
}
